package com.wolfpire.workflow.om;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 流程节点
 * @author lihd
 *
 */

@Entity
@Table(name = "wf_node")
public class Node implements Serializable{

	private static final long serialVersionUID = -6493464807357666622L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "node_id", unique = true, nullable = false, length = 16)
	private Long nodeId;
	
	@Column(name = "WORKFLOW_ID", length = 8)
	private Long workFlowId;
	
	@Column(name = "DEPLOYMENT_ID")
	private Long deploymentId;
	
	@Column(name = "NODE_NAME")
	private String nodeName;
	
	@Column(name = "NODE_TYPE")
	private String nodeType;//节点类型
	
	@Column(name = "FORM_TYPE_ID")
	private Long formTypeId;//表单类型ID
	
	@Column(name = "HANDLE_CLASS")
	private String handleClass;//条件处理类
	
	@Column(name = "STRATEGY")
	private int strategy;//会签策略
	
	@Column(name = "STRATEGY_VALUE")
	private Integer strategyValue;//会签值

	@Column(name = "IS_REVOKE")
	private Integer isRevoke;//是否可以撤销
	
	@Column(name = "TIME_LIMIT")
	private Long timeLimit;//超时限制
	
	@Column(name = "DYNAMIC_SELECT")
	private String dynamicSelect;//是否动态分配人员
	
	@Column(name = "DYNAMIC_JUMP")
	private String dynamicJump;//动态跳转 （0不可以、 1可以）
	
	@Column(name = "TRUN_TODO")
	private String trunTodo;//是否转办 （0不可以、 1可以）	
	
	@Column(name = "EXPR_TEXT")
	private String exprText;//决策表达式
	
	@Column(name = "TURN_TOPROMOTER")
	private String turnToPromoter;//是否回到任务发起人审批(0否、1是)
	
	@Column(name = "FILE_UP")
	private String fileUp;//是否附件上传 （0不可以、 1可以）	
	
	@Column(name = "PHASE")
	private String phase;// 节点对应阶段

	public Node() {
		super();
	}

	public Node(Long nodeId, Long workFlowId, Long deploymentId,
			String nodeName, String nodeType, Long formTypeId,
			String handleClass, int strategy, Integer strategyValue,
			Integer isRevoke, Long timeLimit, String dynamicSelect,
			String dynamicJump, String trunTodo, String exprText,
			String turnToPromoter, String fileUp, String phase) {
		super();
		this.nodeId = nodeId;
		this.workFlowId = workFlowId;
		this.deploymentId = deploymentId;
		this.nodeName = nodeName;
		this.nodeType = nodeType;
		this.formTypeId = formTypeId;
		this.handleClass = handleClass;
		this.strategy = strategy;
		this.strategyValue = strategyValue;
		this.isRevoke = isRevoke;
		this.timeLimit = timeLimit;
		this.dynamicSelect = dynamicSelect;
		this.dynamicJump = dynamicJump;
		this.trunTodo = trunTodo;
		this.exprText = exprText;
		this.turnToPromoter = turnToPromoter;
		this.fileUp = fileUp;
		this.phase = phase;
	}

	public Long getNodeId() {
		return nodeId;
	}

	public void setNodeId(Long nodeId) {
		this.nodeId = nodeId;
	}

	public Long getWorkFlowId() {
		return workFlowId;
	}

	public void setWorkFlowId(Long workFlowId) {
		this.workFlowId = workFlowId;
	}

	public Long getDeploymentId() {
		return deploymentId;
	}

	public void setDeploymentId(Long deploymentId) {
		this.deploymentId = deploymentId;
	}

	public String getNodeName() {
		return nodeName;
	}

	public void setNodeName(String nodeName) {
		this.nodeName = nodeName;
	}

	public String getNodeType() {
		return nodeType;
	}

	public void setNodeType(String nodeType) {
		this.nodeType = nodeType;
	}

	public Long getFormTypeId() {
		return formTypeId;
	}

	public void setFormTypeId(Long formTypeId) {
		this.formTypeId = formTypeId;
	}

	public String getHandleClass() {
		return handleClass;
	}

	public void setHandleClass(String handleClass) {
		this.handleClass = handleClass;
	}

	public int getStrategy() {
		return strategy;
	}

	public void setStrategy(int strategy) {
		this.strategy = strategy;
	}

	public Integer getStrategyValue() {
		return strategyValue;
	}

	public void setStrategyValue(Integer strategyValue) {
		this.strategyValue = strategyValue;
	}

	public Integer getIsRevoke() {
		return isRevoke;
	}

	public void setIsRevoke(Integer isRevoke) {
		this.isRevoke = isRevoke;
	}

	public Long getTimeLimit() {
		return timeLimit;
	}

	public void setTimeLimit(Long timeLimit) {
		this.timeLimit = timeLimit;
	}

	public String getDynamicSelect() {
		return dynamicSelect;
	}

	public void setDynamicSelect(String dynamicSelect) {
		this.dynamicSelect = dynamicSelect;
	}

	public String getDynamicJump() {
		return dynamicJump;
	}

	public void setDynamicJump(String dynamicJump) {
		this.dynamicJump = dynamicJump;
	}

	public String getTrunTodo() {
		return trunTodo;
	}

	public void setTrunTodo(String trunTodo) {
		this.trunTodo = trunTodo;
	}

	public String getExprText() {
		return exprText;
	}

	public void setExprText(String exprText) {
		this.exprText = exprText;
	}

	public String getTurnToPromoter() {
		return turnToPromoter;
	}

	public void setTurnToPromoter(String turnToPromoter) {
		this.turnToPromoter = turnToPromoter;
	}

	public String getFileUp() {
		return fileUp;
	}

	public void setFileUp(String fileUp) {
		this.fileUp = fileUp;
	}

	public String getPhase() {
		return phase;
	}

	public void setPhase(String phase) {
		this.phase = phase;
	}
	
}
